package nl.altenpts.net.kad;

import java.util.Arrays;

public class Key {
	
	public Key(byte[] key) {
		this.key = key;
	}
	
	public int hashCode() {
		return Arrays.hashCode(key);
	}
	
	public boolean equals(Object other) {
		if(! (other instanceof Key)) {
			return false;
		} else {
			return Arrays.equals(key, ((Key) other).key);
		}
	}
	
	public byte[] getArray() {
		return key;
	}
	
	private byte[] key;	
}
